//
//  RegistGetIdentifyingViewController.m
//  Consume100
//
//  Created by eliot on 16/3/22.
//  Copyright © 2016年 aleven. All rights reserved.
//

#import "RegistGetIdentifyingViewController.h"
#import "RegistPassWordViewController.h"
@interface RegistGetIdentifyingViewController ()

@property (weak, nonatomic) IBOutlet UITextField *phoneNumTextField;

@property (weak, nonatomic) IBOutlet UITextField *identifyingTextField;

@property (weak, nonatomic) IBOutlet UIButton *getIdentifyingBtn;

@property (weak, nonatomic) IBOutlet UIButton *nextBtn;


@end

@implementation RegistGetIdentifyingViewController

- (void)viewWillAppear:(BOOL)animated {
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
}

+(RegistGetIdentifyingViewController*)CreatRegistGetIdentifyingViewController{
    
    UIStoryboard *story=[UIStoryboard storyboardWithName:@"Main" bundle:nil];
    RegistGetIdentifyingViewController *identifying=[story instantiateViewControllerWithIdentifier:@"RegistGetIdentifyingViewController"];
    return identifying;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithRed:237/255.0 green:237/255.0 blue:237/255.0 alpha:1];
    self.nextBtn.layer.cornerRadius = 4;
    self.nextBtn.layer.masksToBounds = YES;
    self.getIdentifyingBtn.layer.cornerRadius = 4;
    self.getIdentifyingBtn.layer.masksToBounds = YES;
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:19],NSForegroundColorAttributeName:[UIColor whiteColor]}];
    self.getIdentifyingBtn.backgroundColor = [UIColor colorWithRed:255/255.0 green:88/255.0 blue:88/255.0 alpha:1];
    self.nextBtn.backgroundColor = [UIColor colorWithRed:255/255.0 green:88/255.0 blue:88/255.0 alpha:1];
    self.phoneNumTextField.keyboardType = UIKeyboardTypeNumberPad;
    self.identifyingTextField.keyboardType = UIKeyboardTypeNumberPad;
    
}


//点击获取验证码
- (IBAction)cilckGetIdentifyingBtn:(id)sender {
    
}

//点击下一步
- (IBAction)clickNextBtn:(id)sender {
    
    RegistPassWordViewController *vc = [RegistPassWordViewController CreatRegistPassWordViewController];
    [self creatNav:vc];
    
}

//创建模态导航控制器
-(void)creatNav:(UIViewController *)view{
    
    UINavigationController *nav=[[UINavigationController alloc] initWithRootViewController:view];
    nav.navigationBar.barTintColor = [UIColor colorWithRed:254/255.0 green:154/255.0 blue:37/255.0 alpha:1];
    view.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_back"] style:UIBarButtonItemStylePlain target:self action:@selector(dismiss)];
    [self presentViewController:nav animated:YES completion:nil];
}

- (void)dismiss {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
